package com.atguigu.java.ai.langchain4j.config;

import dev.langchain4j.model.openai.OpenAiChatModel;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class LangChain4jConfig {

    @Bean
    public OpenAiChatModel openAiChatModel() {
        return OpenAiChatModel.builder()
                .apiKey("demo") // 替换为你的 OpenAI API Key
                .modelName("gpt-4o-mini") // 可选，指定模型名称
                .build();
    }
}
